3.5.45 \(\int \frac {(A+B x) (a^2+2 a b x+b^2 x^2)}{x^4} \, dx\)

Optimal. Leaf size=49 \[ -\frac {a^2 A}{3 x^3}-\frac {a (a B+2 A b)}{2 x^2}-\frac {b (2 a B+A b)}{x}+b^2 B \log (x) \]

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {27, 76} \begin {gather*} -\frac {a^2 A}{3 x^3}-\frac {a (a B+2 A b)}{2 x^2}-\frac {b (2 a B+A b)}{x}+b^2 B \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((A + B*x)*(a^2 + 2*a*b*x + b^2*x^2))/x^4,x]

[Out]

-(a^2*A)/(3*x^3) - (a*(2*A*b + a*B))/(2*x^2) - (b*(A*b + 2*a*B))/x + b^2*B*Log[x]

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 76

Int[((d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_))*((e_) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*
x)*(d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, d, e, f, n}, x] && IGtQ[p, 0] && (NeQ[n, -1] || EqQ[p, 1]) && N
eQ[b*e + a*f, 0] && ( !IntegerQ[n] || LtQ[9*p + 5*n, 0] || GeQ[n + p + 1, 0] || (GeQ[n + p + 2, 0] && Rational
Q[a, b, d, e, f])) && (NeQ[n + p + 3, 0] || EqQ[p, 1])

Rubi steps

\begin {align*} \int \frac {(A+B x) \left (a^2+2 a b x+b^2 x^2\right )}{x^4} \, dx &=\int \frac {(a+b x)^2 (A+B x)}{x^4} \, dx\\ &=\int \left (\frac {a^2 A}{x^4}+\frac {a (2 A b+a B)}{x^3}+\frac {b (A b+2 a B)}{x^2}+\frac {b^2 B}{x}\right ) \, dx\\ &=-\frac {a^2 A}{3 x^3}-\frac {a (2 A b+a B)}{2 x^2}-\frac {b (A b+2 a B)}{x}+b^2 B \log (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 48, normalized size = 0.98 \begin {gather*} b^2 B \log (x)-\frac {a^2 (2 A+3 B x)+6 a b x (A+2 B x)+6 A b^2 x^2}{6 x^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((A + B*x)*(a^2 + 2*a*b*x + b^2*x^2))/x^4,x]

[Out]

-1/6*(6*A*b^2*x^2 + 6*a*b*x*(A + 2*B*x) + a^2*(2*A + 3*B*x))/x^3 + b^2*B*Log[x]

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(A+B x) \left (a^2+2 a b x+b^2 x^2\right )}{x^4} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[((A + B*x)*(a^2 + 2*a*b*x + b^2*x^2))/x^4,x]

[Out]

IntegrateAlgebraic[((A + B*x)*(a^2 + 2*a*b*x + b^2*x^2))/x^4, x]

________________________________________________________________________________________

fricas [A]  time = 0.41, size = 53, normalized size = 1.08 \begin {gather*} \frac {6 \, B b^{2} x^{3} \log \relax (x) - 2 \, A a^{2} - 6 \, {\left (2 \, B a b + A b^{2}\right )} x^{2} - 3 \, {\left (B a^{2} + 2 \, A a b\right )} x}{6 \, x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(b^2*x^2+2*a*b*x+a^2)/x^4,x, algorithm="fricas")

[Out]

1/6*(6*B*b^2*x^3*log(x) - 2*A*a^2 - 6*(2*B*a*b + A*b^2)*x^2 - 3*(B*a^2 + 2*A*a*b)*x)/x^3

________________________________________________________________________________________

giac [A]  time = 0.16, size = 51, normalized size = 1.04 \begin {gather*} B b^{2} \log \left ({\left | x \right |}\right ) - \frac {2 \, A a^{2} + 6 \, {\left (2 \, B a b + A b^{2}\right )} x^{2} + 3 \, {\left (B a^{2} + 2 \, A a b\right )} x}{6 \, x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(b^2*x^2+2*a*b*x+a^2)/x^4,x, algorithm="giac")

[Out]

B*b^2*log(abs(x)) - 1/6*(2*A*a^2 + 6*(2*B*a*b + A*b^2)*x^2 + 3*(B*a^2 + 2*A*a*b)*x)/x^3

________________________________________________________________________________________

maple [A]  time = 0.05, size = 52, normalized size = 1.06 \begin {gather*} B \,b^{2} \ln \relax (x )-\frac {A \,b^{2}}{x}-\frac {2 B a b}{x}-\frac {A a b}{x^{2}}-\frac {B \,a^{2}}{2 x^{2}}-\frac {A \,a^{2}}{3 x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)*(b^2*x^2+2*a*b*x+a^2)/x^4,x)

[Out]

-1/3*A*a^2/x^3-a/x^2*A*b-1/2*B*a^2/x^2-A*b^2/x-2*b/x*B*a+B*b^2*ln(x)

________________________________________________________________________________________

maxima [A]  time = 0.55, size = 50, normalized size = 1.02 \begin {gather*} B b^{2} \log \relax (x) - \frac {2 \, A a^{2} + 6 \, {\left (2 \, B a b + A b^{2}\right )} x^{2} + 3 \, {\left (B a^{2} + 2 \, A a b\right )} x}{6 \, x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(b^2*x^2+2*a*b*x+a^2)/x^4,x, algorithm="maxima")

[Out]

B*b^2*log(x) - 1/6*(2*A*a^2 + 6*(2*B*a*b + A*b^2)*x^2 + 3*(B*a^2 + 2*A*a*b)*x)/x^3

________________________________________________________________________________________

mupad [B]  time = 0.05, size = 48, normalized size = 0.98 \begin {gather*} B\,b^2\,\ln \relax (x)-\frac {x^2\,\left (A\,b^2+2\,B\,a\,b\right )+\frac {A\,a^2}{3}+x\,\left (\frac {B\,a^2}{2}+A\,b\,a\right )}{x^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + B*x)*(a^2 + b^2*x^2 + 2*a*b*x))/x^4,x)

[Out]

B*b^2*log(x) - (x^2*(A*b^2 + 2*B*a*b) + (A*a^2)/3 + x*((B*a^2)/2 + A*a*b))/x^3

________________________________________________________________________________________

sympy [A]  time = 0.52, size = 54, normalized size = 1.10 \begin {gather*} B b^{2} \log {\relax (x )} + \frac {- 2 A a^{2} + x^{2} \left (- 6 A b^{2} - 12 B a b\right ) + x \left (- 6 A a b - 3 B a^{2}\right )}{6 x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(b**2*x**2+2*a*b*x+a**2)/x**4,x)

[Out]

B*b**2*log(x) + (-2*A*a**2 + x**2*(-6*A*b**2 - 12*B*a*b) + x*(-6*A*a*b - 3*B*a**2))/(6*x**3)

________________________________________________________________________________________